import './CategoryDesciption.scss';

const CategoryDesciption = ({
  basePath,
  currentCategory,
}: {
  basePath: string;
  currentCategory: Obj | null;
}) => {
  return (
    <div className="category-description">
      {basePath == 'categories' && currentCategory?.description ? (
        <>
          <div className="category-description-title">
            {currentCategory?.title}
          </div>
          {currentCategory?.description ? (
            <div className="category-description-desc">
              <div
                className="std"
                dangerouslySetInnerHTML={{
                  __html: currentCategory?.description,
                }}
              ></div>
            </div>
          ) : (
            ''
          )}
        </>
      ) : (
        <></>
      )}
    </div>
  );
};

export default CategoryDesciption;
